If Windows 7 is acting erratically (or, I should
say, if it’s acting more erratically than usual), the problem could be
a service that’s somehow gotten corrupted. How can you tell? The most
obvious clue is an error message that tells you a particular service
isn’t running or couldn’t start. You can also check the Event Viewer
for service errors. Finally, if a particular feature of Windows 7 is
acting funny and you know that a service is associated with that
feature, you might suspect that service is causing the trouble.
To fix the problem (hopefully!), you can reset the broken service, a procedure that involves the following four general steps:
1. | Find out the name of the service that is (or that you suspect is) broken.
|
2. | Delete the service.
|
3. | Load a backup copy of the system hive into the Registry.
|
4. | Copy the service from the backup hive copy to service’s actual Registry location.
|
To begin, follow these steps to determine the name of the service:
1. | Select Start, type services.msc, and press Enter. Windows 7 opens the Services snap-in.
|
2. | Double-click the service you want to reset.
|
3. | In the General tab, locate the Service Name value (see Figure 1) and make a note of it.
|
4. | Click OK.
|
Next, follow these steps to delete the service:
1. | Select Start, type command,
right-click Command Prompt in the results, click Run as Administrator,
and then enter your User Account Control credentials. Windows 7 opens
an Administrator Command Prompt session.
|
2. | Type the following (where service is the service name that you noted in the previous set of steps):
|
3. | Press Enter. Windows 7 attempts to delete the service.
|
If the deletion works properly, you see the following message:
[SC] DeleteService SUCCESS
Note that you need the Command Prompt again a bit later, so leave the session open for now.
Note
If
the deletion isn’t successful, double-check the service name. If you’re
sure you have the name right, try deleting the service using the
Registry Editor, instead. Open the Registry Editor, navigate to the HKLM\System\CurrentControlSet\Services key, and then locate the service. Right-click the service and then click Delete.
Now follow these steps to load a fresh copy of the system hive:
1. | Select Start, type regedit, press Enter, and then enter your User Account Control credentials to open the Registry Editor.
|
2. | Select the HKEY_LOCAL_MACHINE key.
|
3. | Select File, Load Hive to open the Load Hive dialog box.
|
4. | Open the system backup file:
%SystemRoot%\system32\config\RegBack\SYSTEM.OLD
|
5. | Click Open. The Registry Editor prompts you for a key name.
|
6. | Type reset and click OK.
|
You now have the backup copy of the system hive loaded into HKLM\reset key. Now you complete the operation by copying the service from this backup:
1. | Return to the Command Prompt.
|
2. | Type the following (where service is the service name that you noted in the first set of steps):
reg copy hklm\reset\controlset001\services\servicehklm\system\currentcontrolset\services\service /s /f
|
3. | Press Enter. Windows 7 copies the backup version of the service to the original Registry location.
|
4. | Reboot your PC to put the change into effect. |